
<template>
  <el-table v-loading="loading" :data="blockList">
    <el-table-column label="区块链节点" align="center" prop="nodeId" />
    <el-table-column label="状态" align="center" prop="statusText" width="100"/>
  </el-table>
</template>

<script>
import {getNodeStatusList} from '@/api/statistics/boxCard'

export default {
  data() {
    return {
      // 遮罩层
      loading: true,
      blockList: []
    };
  },mounted() {
    this.getList();
  },
  methods: {
    getList() {
      this.loading = true;
      getNodeStatusList(this.queryParams).then(response => {
        console.log(response);
        this.blockList = response.data;
        this.blockList.forEach((item, index) => {
          item.statusText=item.status==1?"正常":"异常";
        })
        this.loading = false;
      });
    },
  }
}
</script>

<style scoped lang="scss">

</style>
